An image forming apparatus forms an image by transferring a toner image onto a sheet. The toner image is formed on a photoreceptor. Thereafter, the toner image is primarily transferred to an intermediate transfer belt by a primary transfer unit. The primarily transferred toner image is secondarily transferred to the sheet by a secondary transfer unit. The toner image secondarily transferred to the sheet is fixed on the sheet by a fixing unit. Untransferred toner remains on the photoreceptor after primary transfer. The untransferred toner is removed from the photoreceptor by a photoreceptor cleaner. The toner removed by the photoreceptor cleaner is collected in a waste toner-storing container. Untransferred toner remains on the intermediate transfer belt also after secondary transfer. The untransferred toner is removed from the intermediate transfer belt by an intermediate transfer belt cleaner. The toner removed by the intermediate transfer belt cleaner is collected in the waste toner-storing container. The waste toner-storing container is provided with a waste toner-detecting sensor. The waste toner-detecting sensor detects a height of waste toner deposited in the waste toner-storing container. For example, when the waste toner-detecting sensor detects that the waste toner-storing container is completely filled with the waste toner, the image forming apparatus displays a message for urging to exchange the waste toner-storing container. Since overflow of the waste toner causes malfunction, the image forming apparatus stops an image forming operation. In some cases, a user detaches the waste toner-storing container and shakes the detached waste toner-storing container and/or turns the detached waste toner-storing container upside down. In those cases, the height of the deposited waste toner changes. When the waste toner-storing container is reattached to the image forming apparatus, there is a fear that the waste toner-detecting sensor may erroneously detect that the waste toner-storing container is not completely filled with the waste toner. In this case, the image forming apparatus is enabled to restart image forming. However, there is a problem in that overflow of waste toner may cause malfunction.